home *** CD-ROM | disk | FTP | other *** search
/ Chip 2007 January, February, March & April / Chip-Cover-CD-2007-02.iso / Pakiet bezpieczenstwa / mini Pentoo LiveCD 2006.1 / mpentoo-2006.1.iso / livecd.squashfs / usr / lib / mozilla-firefox / idl / nsICookieManager2.idl < prev    next >
Encoding:
Text File  |  2006-05-08  |  3.7 KB  |  96 lines

  1. /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
  2. /* ***** BEGIN LICENSE BLOCK *****
  3.  * Version: MPL 1.1/GPL 2.0/LGPL 2.1
  4.  *
  5.  * The contents of this file are subject to the Mozilla Public License Version
  6.  * 1.1 (the "License"); you may not use this file except in compliance with
  7.  * the License. You may obtain a copy of the License at
  8.  * http://www.mozilla.org/MPL/
  9.  *
  10.  * Software distributed under the License is distributed on an "AS IS" basis,
  11.  * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
  12.  * for the specific language governing rights and limitations under the
  13.  * License.
  14.  *
  15.  * The Original Code is mozilla.org code.
  16.  *
  17.  * The Initial Developer of the Original Code is
  18.  * Netscape Communications Corporation.
  19.  * Portions created by the Initial Developer are Copyright (C) 2003
  20.  * the Initial Developer. All Rights Reserved.
  21.  *
  22.  * Contributor(s):
  23.  *
  24.  * Alternatively, the contents of this file may be used under the terms of
  25.  * either the GNU General Public License Version 2 or later (the "GPL"), or
  26.  * the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
  27.  * in which case the provisions of the GPL or the LGPL are applicable instead
  28.  * of those above. If you wish to allow use of your version of this file only
  29.  * under the terms of either the GPL or the LGPL, and not to allow others to
  30.  * use your version of this file under the terms of the MPL, indicate your
  31.  * decision by deleting the provisions above and replace them with the notice
  32.  * and other provisions required by the GPL or the LGPL. If you do not delete
  33.  * the provisions above, a recipient may use your version of this file under
  34.  * the terms of any one of the MPL, the GPL or the LGPL.
  35.  *
  36.  * ***** END LICENSE BLOCK ***** */
  37.  
  38. #include "nsICookieManager.idl"
  39.  
  40. interface nsICookie2;
  41.  
  42. /** 
  43.  * Additions to the frozen nsICookieManager
  44.  */
  45.  
  46. [scriptable, uuid(3E73FF5F-154E-494f-B640-3C654BA2CC2B)]
  47. interface nsICookieManager2 : nsICookieManager
  48. {
  49.   /**
  50.    * Add a cookie. nsICookieService is the normal way to do this. This
  51.    * method is something of a backdoor.
  52.    *
  53.    * @param aDomain
  54.    *        the host or domain for which the cookie is set. presence of a
  55.    *        leading dot indicates a domain cookie; otherwise, the cookie
  56.    *        is treated as a non-domain cookie. see RFC2109.
  57.    * @param aPath
  58.    *        path within the domain for which the cookie is valid
  59.    * @param aName
  60.    *        cookie name
  61.    * @param aValue
  62.    *        cookie data
  63.    * @param aSecure
  64.    *        true if the cookie should only be sent over a secure connection.
  65.    * @param aIsSession
  66.    *        true if the cookie should exist for the current session only.
  67.    * @param aExpiry
  68.    *        expiration date, in seconds since the epoch. only relevant if
  69.    *        aIsSession is false.
  70.    */
  71.   void add(in AUTF8String aDomain,
  72.            in AUTF8String aPath,
  73.            in ACString    aName,
  74.            in ACString    aValue,
  75.            in boolean     aSecure,
  76.            in boolean     aIsSession,
  77.            in PRInt64     aExpiry);
  78.  
  79.   /**
  80.    * Find whether a matching cookie already exists, and how many cookies
  81.    * a given host has already set. This is useful when e.g. prompting the
  82.    * user whether to accept a given cookie.
  83.    *
  84.    * @param aCookie
  85.    *        the cookie to look for
  86.    * @param aCountFromHost
  87.    *        the number of cookies found whose hosts are the same as, or
  88.    *        subdomains of, the host field of aCookie
  89.    *
  90.    * @return true if a cookie was found which matches the host, path, and name
  91.    *         fields of aCookie
  92.    */
  93.   boolean findMatchingCookie(in nsICookie2     aCookie,
  94.                              out unsigned long aCountFromHost);
  95. };
  96.